﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.WorkBill
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    using DB_NH.DB_Model.WorkBill;

    public class WorkBillEvaluate_map : EntityMapping<WorkBillEvaluate>
    {
        public WorkBillEvaluate_map()
        {
            //所属工作单
            ManyToOne(x => x.WorkBill, map =>
            {
                map.Column("WorkBillId");
            });

            Property(x => x.EvaluateContent, map =>
            {
                map.Length(90000);
            });

            Property(x => x.EvaluateLevel, map =>
            {
            });

            //评价者
            ManyToOne(x => x.Evaluator, map =>
            {
                map.Column("EvaluatorId");
                map.NotNullable(false);
            });

            Table(WorkBillEvaluate.TableName);
        }
    }
}
